<?php
namespace houdun\view;
class Base{
    public $url;
    public $var;
    public function make($url=''){
        $this->url='../app/'.MODULE.'/view/'.CONTROLLER.'/'.($url? :ACTION) .'.php';
//        echo $url;
        return $this;
    }
    public function with($var){
        //p($var)只能用p打印数组 ;
       $this->var=$var;
       // echo $var;
       return $this;
    }
    public function __toString()
    {   if($this->var){
        extract($this->var);
       }

        include $this->url;

        return '';
    }
}